pub mod pipeline;
pub mod channel;

pub use pipeline::*;
pub use channel::*;

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        pipeline::Pipeline::new(|out|{
            out.send(1);
            out.send(2);
            out.send(3);
        }).pipe(|out,recv|{
            for i in recv { out.send(i+1); }
        }).end(|recv|{
            for i in recv {
                println!("{i}");
            }
        }).expect("thread handler error");
    }
}
